let text1: HTMLSpanElement;
let text2: HTMLSpanElement;
window.onload = () => {
    text1 = document.getElementById("text1") as HTMLSpanElement;
    text2 = document.getElementById("text2") as HTMLSpanElement;
    text1.innerText = "PrepareLoading";
    text2.innerText = "0%";
}

function SetLoadingText(_text1: string, _text2: string): void {
    if (_text1 != null)
        text1.innerText = _text1;
    if (_text2 != null)
        text2.innerText = _text2;
}
async function EndLoading() {
    await fetch("/endloading");
}